package hystrix.client;
import hystrix.service.HystrixCustomerFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
/**
 * 降级方法一：使用FeignClient
 */
@FeignClient(value = "HYSTRIX-PROVIDER",fallbackFactory = HystrixCustomerFallbackFactory.class,contextId = "client1")
public interface ProviderClient {
    @RequestMapping(value="/c1", method = RequestMethod.GET)
    String c1();

    @RequestMapping(value="/c2", method = RequestMethod.GET)
    String c2();

    @RequestMapping(value="/c3", method = RequestMethod.GET)
    String c3();

    @RequestMapping(value="/c4", method = RequestMethod.GET)
    String c4();
}
